package com.spring.test.instance.service;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.annotation.Lookup;
import org.springframework.stereotype.Component;

@Component
public class UserService implements DisposableBean {

	@IntINJect
	private Integer myInt;

	private OrderService orderService;

	public OrderService getOrderService() {
		return orderService;
	}

	public void setOrderService(OrderService orderService) {
		this.orderService = orderService;
	}

	public void printClass() {
		System.out.println("This is Class A: " + this);
		getClassB().getClass();
	}

	@Lookup
	public OrderService getClassB() {
		return null;
	}

	@Override
	public void destroy() throws Exception {
		System.out.println("bean被销毁了");
	}
}
